package com.example.vv.model.search.contract;

import android.app.Activity;

import com.example.vv.adapter.BaseRecyclerViewAdapter;
import com.example.vv.fragmentWork.base.BaseView;
import com.example.vv.fragmentWork.entity.ArticleEntity;
import com.example.vv.fragmentWork.entity.BannerEntity;
import com.example.vv.fragmentWork.entity.HotEntity;
import com.example.vv.fragmentWork.entity.NaviEntity;
import com.example.vv.fragmentWork.entity.SearchEntity;
import com.example.vv.fragmentWork.entity.TopEntity;
import com.example.vv.res.net.BaseResponse;

import java.util.List;

import io.reactivex.Observable;

public interface SearchContract {
    interface Model{
        //网络请求article数据
        Observable<BaseResponse> REQUEST_SEARCH(String api, String values);

        Observable<BaseResponse> REQUEST_Hot(String api);
    }
    interface View extends BaseView {

        /**
         * 搜索
         * @param searchEntity
         */
        void getSearchData(SearchEntity searchEntity);

        /**
         * hot数据
         * @param hotEntity
         */
        void getHotData(List<HotEntity> hotEntity);

        void getHistoryData(List<String> history);

    }
    interface Presenter{

        /**
         * 获取搜索数据
         * @param values
         */
        void setSearchData(String values);

        /**
         * 获取热搜数据
         */
        void setHotData();

        void setHistoryData(String str);

        void setHistoryData2(List<String> list);

        BaseRecyclerViewAdapter setHOtAdapter(List<HotEntity> list, Activity activity);

        BaseRecyclerViewAdapter setSearchAdapter(List<SearchEntity.DatasBean> list, Activity activity);

        BaseRecyclerViewAdapter setHistoryAdapter(List<String> list, Activity activity);

    }


}
